package com.newtouch.cq.base.starter.business.mapper;

import com.newtouch.cq.base.starter.business.entity.SysMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newtouch.cq.base.starter.business.model.vo.MenuVO;

import java.util.List;

/**
 * <p>
 * 系统菜单表 Mapper 接口
 * </p>
 *
 * @author Alex
 * @since 2021-08-02
 */
public interface BaseSysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * 通过userId查询菜单列表
     * @param userId
     * @return
     */
    List<MenuVO> getByUserId(long userId);

    /**
     * 通过角色标识查询菜单权限
     * @param roleId
     * @return
     */
    List<SysMenu> getRolePermissions(long roleId);

}
